<template>
    <view
        class="bg"
        :style="{ width: width || '100%', height: height || 'auto' }"
    >
        <image
            class="img"
            :style="{ width: width || '100%', height: height || 'auto' }"
            :src="src"
        ></image>
    </view>
</template>
<script lang="ts" setup>
import { defineProps } from 'vue'
defineProps(['width', 'height', 'src'])
</script>
<style lang="scss">
.bg {
    position: absolute;
    z-index: 0;
}

.bg .img {
    width: 100%;
    max-height: 100%;
}
</style>
